﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsGame1
{
    public partial class FormTemps : Form
    {
        private bool _PlayPause = false;
        public bool PlayPause
        {
            get { return _PlayPause; }
            set { _PlayPause = value; }
        }
        
        public FormTemps()
        {
            InitializeComponent();
        }

        private void FormTemps_Load(object sender, EventArgs e)
        {
            Image im = Image.FromFile(Application.StartupPath + @"\Content\play.png");
            Bitmap img = new Bitmap(im, new System.Drawing.Size(pbPlayPause.Width, pbPlayPause.Height));
            pbPlayPause.BackgroundImage = img;
            im = Image.FromFile(Application.StartupPath + @"\Content\restart.png");
            img = new Bitmap(im, new System.Drawing.Size(pbRestart.Width, pbRestart.Height));
            pbRestart.BackgroundImage = img;

        }

        private void pbPlayPause_Click(object sender, EventArgs e)
        {
            if (_PlayPause)
            {
                Image im = Image.FromFile(Application.StartupPath + @"\Content\play.png");
                Bitmap img = new Bitmap(im, new System.Drawing.Size(pbPlayPause.Width, pbPlayPause.Height));
                pbPlayPause.BackgroundImage = img;
                _PlayPause = false;
            }
            else
            {
                Image im = Image.FromFile(Application.StartupPath + @"\Content\pause.png");
                Bitmap img = new Bitmap(im, new System.Drawing.Size(pbPlayPause.Width, pbPlayPause.Height));
                pbPlayPause.BackgroundImage = img;
                _PlayPause = true;
            }
        }
    }
}
